package com.qys.livesMall.shortVideo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qys.livesMall.shortVideo.model.dto.app.AppVideoUserDTO;
import com.qys.livesMall.shortVideo.model.entity.ShortVideoUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qys.livesMall.shortVideo.model.enums.ShortVideoEventTypeEnum;
import com.qys.livesMall.shortVideo.model.vo.app.AppUserCollectionLikeVO;

/**
 * <p>
 * 短视频用户关联表 服务类
 * </p>
 *
 * @author
 * @since 2023-05-29
 */
public interface ShortVideoUserService extends IService<ShortVideoUser> {

    /**
     * 创建用户短视频关联信息
     *
     * @param videoId                 短视频id
     * @param userId                  用户id
     * @param shortVideoEventTypeEnum {@link ShortVideoEventTypeEnum}
     */
    void save(String videoId, Long userId, ShortVideoEventTypeEnum shortVideoEventTypeEnum);

    /**
     * 用户点赞/取消点赞
     *
     * @param videoUser               {@link ShortVideoUser}
     * @param shortVideoEventTypeEnum {@link ShortVideoEventTypeEnum}
     */
    void update(ShortVideoUser videoUser, ShortVideoEventTypeEnum shortVideoEventTypeEnum);

    /**
     * 用户点赞收藏短视频信息
     *
     * @param videoId                 短视频id
     * @param shortVideoEventTypeEnum {@link  ShortVideoEventTypeEnum}
     */
    void userLikeOrCollection(String videoId, ShortVideoEventTypeEnum shortVideoEventTypeEnum);

    /**
     * 查询用户收藏/点赞短视频信息
     *
     * @param videoUserDTO {@link AppVideoUserDTO}
     */
    Page<AppUserCollectionLikeVO> pageByApp(AppVideoUserDTO videoUserDTO);
}
